﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/Layouts/Home.Master" AutoEventWireup="true" CodeBehind="ProductByCategory.aspx.cs" Inherits="Thuoc24h.Home.Pages.ProductByCategory" %>
 <%@Import namespace="CSS" %>
    <%@Import namespace="Thuoc24h.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPLH" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPLH" runat="server">
<h1 class="TopHeader">
        <asp:Label runat="server" ID="CatNameLbl"></asp:Label>
    </h1>
    <div id="SearchMedicineWrapper">        
        <div id="MedicineListWrapper">
            <div id="MedicineListContent">
                <asp:Repeater runat="server" ID="ProductListRpt">
                    <ItemTemplate>
                        <div class="ProductItem">
                        <div class="ProductItemContent">
                            <h2 class="ProductItemTitle">
                                <a href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>"><%#Eval("Name") %></a></h2>
                             <a href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>"><img src='<%# Eval("ThumbImage")%>' alt='<%#Eval("Name") %>' class="ProductItemAvatar" /></a>
                            <div class="ProductItemDescription">
                                <%#Eval("Description").GetLeft(50,true) %>
                            </div>
                            <div class="ProductItemInfo">
                                <table>
                                    <tr>
                                        
                                        <td>
                                            <span class="ProductPrice"><%#Eval("PriceDiscount").FormatMoney() %></span>
                                        </td>
                                    </tr>
                                    <tr>
                                       
                                        <td>
                                            <span class="ProductSourcePrice"><%#Eval("Price").FormatMoney("&nbsp;") %> </span>
                                        </td>
                                    </tr>
                                    <tr>
                                       
                                        <td>
                                            <span class="ProductDiscount"> - <%#Eval("DiscountPercent") %>%</span>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div class="ProductItemView">
                                <a href="/san-pham/<%#Thuoc24h.Common.Utils.BuildUrl(Eval("Name"),Eval("Id")) %>">Xem</a>
                            </div>
                        </div>
                    </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
             <div class="Pager" style="margin-bottom: 10px">
                 <asp:ListView runat="server" ID="listViewPager">
                    <ItemTemplate></ItemTemplate>
                </asp:ListView>
                <asp:DataPager runat="server" ID="pagerProduct" PagedControlID="listViewPager"  QueryStringField="page" PageSize="15">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu"/>
                        <asp:NumericPagerField />
                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" LastPageText="Trang cuối" />
                    </Fields>
                </asp:DataPager>
            </div>
        </div>
        
         

    </div>
</asp:Content>
